      PROGRAM DOB361
      CHARACTER*25 FNAME(4)
      DIMENSION BX(95,91),BY(95,91,4),BET(95,361)
      TYPE*,' Input old-file FNAME(1:4): ' 
      ACCEPT *,FNAME(1),FNAME(2),FNAME(3),FNAME(4)
      JSE=0
  55  JSE=JSE+1
      JXX=90*(JSE-1)
      DO J=1,91
      DO I=1,95
      BX(I,J)=0.0
      END DO
      END DO
      OPEN(1,NAME=FNAME(JSE),STATUS='OLD')
      DO J=1,91
      READ(1,25) (BX(I,J),I=1,95)
      END DO
      CLOSE(1)
      DO J=1,91
      JP=91-J+1
      DO I=1,94
      BY(I,JP,JSE)=BX(I,J)
      END DO
      BY(95,JP,JSE)=FLOAT(JP-1+JXX)
      END DO
      IF ( JSE .LT. 4 ) GOTO 55
      DO J=1,91
      DO I=1,95
      BET(I,J)=BY(I,J,1)
      END DO
      END DO
      DO J=92,181
      JK=J-90
      DO I=1,95
      BET(I,J)=BY(I,JK,2)
      END DO
      END DO
      DO J=182,271
      JK=J-180
      DO I=1,95
      BET(I,J)=BY(I,JK,3)
      END DO
      END DO
      DO J=272,361
      JK=J-270
      DO I=1,95
      BET(I,J)=BY(I,JK,4)
      END DO
      END DO
      OPEN(2,NAME='B'//FNAME(1)(4:5)//'A360'//FNAME(1)(8:),STATUS='NEW')
      DO J=1,361
      WRITE(2,25) (BET(I,J),I=1,95)
      END DO
  25  FORMAT(5f10.3)
      STOP
      END
       
